import {Http} from "../utils/http";

class Spu {
    /**
     * 计算是否是无规格
     * @param spu
     */
    static inNoSpec(spu) {
        if (spu.sku_list.length === 1 && spu.sku_list[0].specs.length == 0) {
            return true
        }
        return false
    }

    static getDetail(id) {
        return Http.request({
            url: `spu/id/${id}/detail`,
        })
    }
}

export {
    Spu
}